/**
 ******************************* ICE *******************************
 * ========================================================================
 * Project:		icemasterdataservices
 * Package:		org.ice4apps.master.dataservices
 * File:		IceMasterDataServicesLocal.java
 * Author: 		robin
 * Date: 		Mar 27, 2009
 * Description:	
 * ========================================================================
 * 
 */
package org.ice4apps.master.dataservices;

import java.util.List;
import javax.ejb.Local;
import org.ice4apps.master.dao.Client;
import org.ice4apps.master.dao.Enterprise;
import org.ice4apps.master.dao.Office;
import org.ice4apps.master.dao.Organization;
import org.ice4apps.master.dao.Session;
import org.ice4apps.master.dao.SystemAdmin;
import org.ice4apps.master.dao.User;

@Local
public interface IceMasterDataServiceLocal {
    
    public void addSession (Session session);

    public void addSystemAdmin (SystemAdmin admin);

    public void cleanupSessions (long interval);

    public Session getSession (String id);

    public SystemAdmin getSystemAdmin (String id);

    public SystemAdmin getSystemAdminByUsername (String username);

    public void modifySystemAdmin (SystemAdmin admin);

    public void refreshSession (String id);

    public void removeSession (String id);

    public void removeSystemAdmin (String id);

    public void removeSystemAdminByUsername (String username);
    
    public void addEnterprise (Enterprise enterprise);
    
    public Client getClientByKey (String key);
    
    public Enterprise getEnterprise (String id);
    
    public void modifyEnterprise (Enterprise enterprise);
    
    public void deleteEnterprise (String id);
    
    public Enterprise getEnterpriseByName (String name);
    
    public List <Enterprise> getEnterpriseList ();
    
    public void addOrganization (Organization org);
    
    public Organization getOrganizationByName (String name);
    
    public List <Organization> getOrganizationListByEnterprise (String enterpriseName);
    
    public void addOffice (Office office);
    
    public Office getOfficeByName (String name);
    
    public List <Office> getOfficeListByOrganization (String orgName);
    
    public void addUser (User user);
    
    public User getUserByUserName (String userName);
    
    public List <User> getUserListByOffice (String officeName);
}
